/*
	File:		Projectile.h
	Author:		Ben Feldmann
	Purpose:	Class to manage game projectiles
*/

#pragma once

#include "Entity.h"
#include "Emitter.h"

//enum BulletType {BASIC, ROCKET, EMP};


class Projectile : public Entity 
{
private:
	float moveSpeed;
	float damage;
	int ownerType;
	int bulletType;

	float fireLife;
	float lifeTimer;

	Entity* owner;

	Emitter* trail;

	int explosionID;
	Emitter* explosion;

public:
	Projectile();
	virtual ~Projectile();

	virtual void Update(float elapsed);

	virtual void Render();

	virtual bool CheckCollision(IEntity* base);

	void Explosion();

	Entity* GetOwner() const	{return owner;}
	int GetOwnerType() const	{return ownerType;}
	float GetMoveSpeed()const 	{return moveSpeed ;}
	float GetDamage() const		{return damage;}
	int GetBulletType() const	{return bulletType;}

	void SetMoveSpeed(float s)	{moveSpeed = s;}
	void SetDamage(float d)		{damage = d;}
	void SetBulletType(int t)	
	{
		//Bug Fix #62 Start - Brandon Jones
		if(t == 3)
			fireLife = 1;
		//Bug Fix #62 End
		bulletType = t;
	}
	int GetBulletType()			{return bulletType;}
	virtual void SetOwner(Entity* o);

	Emitter* GetTrail() const	{return trail;}
	void SetTrail(Emitter* e)	{trail = e;}
};
